# -*- coding: utf-8 -*-
#
# File: Jogo.py
#
# Copyright (c) 2007 by []
# Generator: ArchGenXML Version 2.0-beta7
#            http://plone.org/products/archgenxml
#
# GNU General Public License (GPL)
#

__author__ = """unknown <unknown>"""
__docformat__ = 'plaintext'

from AccessControl import ClassSecurityInfo
from Products.Archetypes.atapi import *
from zope.interface import implements
import interfaces

from Products.CMFDynamicViewFTI.browserdefault import BrowserDefaultMixin

from Products.futebol.config import *

##code-section module-header #fill in your manual code here
##/code-section module-header

schema = Schema((

    DateTimeField(
        name='data',
        widget=CalendarWidget(
            label='Data',
            label_msgid='futebol_label_data',
            i18n_domain='futebol',
        )
    ),

    StringField(
        name='local',
        widget=StringWidget(
            label='Local',
            label_msgid='futebol_label_local',
            i18n_domain='futebol',
        )
    ),

    IntegerField(
        name='gols_a',
        widget=IntegerField._properties['widget'](
            label='Gols_a',
            label_msgid='futebol_label_gols_a',
            i18n_domain='futebol',
        )
    ),

    IntegerField(
        name='gols_b',
        widget=IntegerField._properties['widget'](
            label='Gols_b',
            label_msgid='futebol_label_gols_b',
            i18n_domain='futebol',
        )
    ),

    ReferenceField(
        name='times',
        widget=ReferenceWidget(
            label='Times',
            label_msgid='futebol_label_times',
            i18n_domain='futebol',
        ),
        allowed_types=('Time',),
        multiValued=0,
        relationship='jogo_time'
    ),

    ReferenceField(
        name='times',
        widget=ReferenceWidget(
            label='Times',
            label_msgid='futebol_label_times',
            i18n_domain='futebol',
        ),
        allowed_types=('Time',),
        multiValued=0,
        relationship='jogo_time'
    ),

),
)

##code-section after-local-schema #fill in your manual code here
##/code-section after-local-schema

Jogo_schema = BaseSchema.copy() + \
    schema.copy()

##code-section after-schema #fill in your manual code here
##/code-section after-schema

class Jogo(BaseContent, BrowserDefaultMixin):
    """
    """
    security = ClassSecurityInfo()
    implements(interfaces.IJogo)

    meta_type = 'Jogo'
    _at_rename_after_creation = True

    schema = Jogo_schema

    ##code-section class-header #fill in your manual code here
    ##/code-section class-header

    # Methods

    security.declarePublic('resultado')
    def resultado(self):
        """
        """
        pass


registerType(Jogo, PROJECTNAME)
# end of class Jogo

##code-section module-footer #fill in your manual code here
##/code-section module-footer



